package com.feri.rbacsys.controller;

import com.feri.rbacsys.bo.CustomAddBo;
import com.feri.rbacsys.bo.CustomBo;
import com.feri.rbacsys.bo.CustomLevelAddBo;
import com.feri.rbacsys.service.intf.CustomLevelService;
import com.feri.rbacsys.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author wmg
 * @date 2023/3/29
 * @apiNote
 */
@RestController
@RequestMapping("/api/level/")
@Api(tags = "客户等级相关接口")
public class CustomLevelController {
    @Resource
    private CustomLevelService service;

    /**
     * 新增*/
    @PostMapping("add")
    @ApiOperation("添加等级")
    public R add(@RequestBody CustomLevelAddBo bo){
        return service.addLevel(bo);
    }

    @ApiOperation("查询所有等级信息")
    @GetMapping("queryall")
    public R queryAll( int page, int size){
        return service.query(page,size);
    }

}
